package com.atguigu.principle.ocp;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 开闭原则
 *
 * @create: 2022-01-12 20:06
 **/
public class Ocp {
    public static void main(String[] args) {

        GraphicEditor graphicEditor = new GraphicEditor();
        graphicEditor.drawTriangle(new RectangleShape());
        graphicEditor.drawTriangle(new CircleShape());
        graphicEditor.drawTriangle(new TriangleShape());
    }
}
